home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 9 code / Tracks / ShowINIT.a < prev    next >
Encoding:
Text File  |  1992-11-16  |  15.2 KB  |  552 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ShowINIT.a
  3. ;
  4. ;    Contains:    xxx put contents here xxx
  5. ;
  6. ;    Written by:    xxx put writers here xxx
  7. ;
  8. ;    Copyright:    © 1992 by Apple Computer, Inc., all rights reserved.
  9. ;
  10. ;    Change History (most recent first):
  11. ;
  12. ;         <4>      9/9/92    MK        do masking the right way
  13. ;         <3>     8/11/92    MK        take out stupid debugger break
  14. ;         <2>     8/11/92    MK        fix register trashing bug
  15. ;         <1>      8/4/92    MK        first checked in
  16. ;
  17. ;
  18.  
  19. ; File: ShowINIT.a
  20. ; Last Modified: Friday, Jan 15, 1991
  21. ;------------------------------------------------------------------------------------------------
  22. ;
  23. ;    INIT notification routine
  24. ;     by Paul Mercer, Darin Adler, and Paul Snively from an idea by Steve Capps
  25. ;        icl4/icl8 support by Brad Lowe
  26. ;
  27. ;    Created:  6/7/87  PM    - First version.
  28. ;    Modified: 6/15/87 PM    - Changed to standard (Pascal) calling conventions.
  29. ;          6/20/87 PM    - Fixed color & Finder bug on Mac II.
  30. ;          6/22/87 DBA    - Improved handling of QuickDraw.
  31. ;          6/29/87 DBA    - Used scratch8 to avoid conflict with “Easy Access”.
  32. ;          6/30/87 DBA    - Changed to a 4-byte scheme with “checksum”.
  33. ;          6/30/87 PFS    - Separated into ShowINIT and InnerShowINIT.
  34. ;          7/1/87  DBA    - Fixed stack bug and switched to CurApName+.
  35. ;          7/2/87  PM    - Added check for old signature in ApplScratch for
  36. ;                   backword compatibility (TMON Startup).
  37. ;          7/3/87  PM    - Removed _SysBeep in ErrorExit since it causes a crash.
  38. ;                   Also changed ICN# plotter to srcOr mode for Blinker.
  39. ;          7/13/87 PM    - Fixed a3 trashing bug in InnerShowINIT - exit code left
  40. ;                   word on stack (reported by D. Dunham). 
  41. ;          7/21/87 PM    - Due to popular demand, InitGraf is no longer being called.
  42. ;                   This avoids the gamma correction problem with Startupscreens
  43. ;                   getting  “washed out” by ShowINIT though someone else is still
  44. ;                   bound to call InitGraf sooner or later (i.e. InitWindows).
  45. ;          7/29/87 PM    - Put InitGraf back in; this is required (reported by C. Derossi
  46. ;                   at Apple Tech Support).  Took out GetPort/SetPort.
  47. ;        10/06/87  PM    - Set CurrentA5 properly.  Rearranged myVars.
  48. ;        12/28/87  PM    - Major revision to accomodate future INIT31 based ShowINIT.
  49. ;        07/14/88  PM    - Major revision to get rid of above 'accomodations'.
  50. ;                   Added color icon 'cicn' support and fixed beep crash.
  51. ;                   Removed support for old signature.
  52. ;        1/21/91      BL    - Added support for icl4's and icl8's.  Removed support for
  53. ;                       for cicn's.  An ICN# must be included for each color icl you want
  54. ;                    displayed (to draw the mask, and for when there is no color or less
  55. ;                    than 4 bit color.)  Showinit displays either an icl4, icl8, or a black
  56. ;                    and white ICN#, depending on what resources are present, and the color
  57. ;                    depth available.
  58. ;
  59. ;------------------------------------------------------------------------------------------------
  60.  
  61.         INCLUDE    'Traps.a'
  62.         INCLUDE    'QuickEqu.a'
  63.         INCLUDE    'SysEqu.a'
  64.         INCLUDE    'ToolEqu.a'
  65.  
  66.         BLANKS  ON
  67.         STRING  ASIS
  68.  
  69. True        equ    1
  70. False        equ    0
  71.  
  72. Debug        equ    True
  73. ;Debug        equ    False
  74.  
  75. myH            equ    CurApName+32-4        ; a GREAT place to store 4 bytes (it was Darin's idea)
  76. myCheck        equ    myH+2            ; a simple checksum of myH to determine first-timeness
  77. firstX        equ    8            ; X coordinate of first icon to be drawn
  78. bottomEdge    equ    8+32            ; this far from bottom of screen
  79. iconWidth    equ    32            ; size of icon (square normally)
  80. defaultMoveX    equ    40            ; default amount to move icons
  81. checksumConst    equ    $1021            ; constant used for computing checksum
  82. minColorDepth    equ    4            ; minimum bits/pixel for drawing color icons
  83.  
  84. maskOffset    equ    128            ; offset to mask in ICN#
  85. iconRowBytes    equ    32/8            ; 32/8 bits
  86.  
  87. hasCQDBit        equ    6            ; this bit in ROM85 is cleared if Color QuickDraw is available
  88.  
  89. iconID            equ    6+4            ; positive stackframe objects
  90. showINITArgs    equ    4
  91.  
  92.  
  93. ; INITDraw1Bit arguments
  94. moveX            equ    4+4        ; a short
  95. iconPtrHdl        equ    6+4        ; a long
  96. theIconID        equ 10+4    ; added
  97. initDrawArgs    equ    8        ; was 6
  98.  
  99. myVars        RECORD    0,DECREMENT
  100. saveA5        ds.l    1
  101. localA5        ds.l    1
  102. thePort        ds.l    1            ; my own QuickDraw (required!)
  103.         ds.b    grafSize-4        ;  other QuickDraw globals (except thePort)
  104.  
  105. destRect    ds.w    4
  106. myBitMap    ds.b    bitMapRec
  107. myPort        ds.b    portRec
  108. icl4Hand    ds.l    1
  109. icl8Hand    ds.l    1
  110.  
  111. varsSize    equ    *
  112.         ENDR
  113.  
  114. ;    DrawIcls routine...
  115. iclVars        RECORD    0,DECREMENT
  116. pixMap    ds.b    pmRec
  117. GDHand    ds.l    1
  118. iclVarSize equ    *
  119.         ENDR
  120.         
  121. ; iclDraw arguments
  122. pixSize            equ    4+4        ; either 4, 8, (or higher)
  123. DestPM            equ    6+4        ; the dest rect pointer
  124. destRect        equ 10+4    ; dest pixmap (ptr) for copybits
  125. iclHand            equ    14+4    ; handle of icl...  assumed to be good
  126. iclDrawArgs        equ    14        ; 
  127.  
  128. ;------------------------------------------------------------------------------------------------
  129. ;                                
  130. ;    Displays the ICN# (cicn when in 4 bit mode or higher) specified by iconID and
  131. ;     move the pen horizontally by moveX.
  132. ;    Pass a -1 in moveX to move the standard amount, moveX should be 40 for most ICN#'s
  133. ;
  134. ;    PROCEDURE ShowINIT(iconID: Integer; moveX: Integer); EXTERNAL
  135. ;
  136. ;    pascal void ShowINIT(iconID, moveX)
  137. ;        short iconID, moveX;
  138. ;        extern;
  139. ;
  140. ;------------------------------------------------------------------------------------------------
  141. ShowINIT:    PROC    EXPORT
  142.         IMPORT    INITDraw1Bit
  143.         link    a6,#0            ; create stack frame
  144.         movem.l    d3-d7/a2-a4,-(sp)    ; save standard registers
  145.                 
  146. ShowINIT1Bit
  147.  
  148.         clr.l    -(sp)            ; try to get the ICN# resource
  149.         move.l    #'ICN#',-(sp)
  150.         move.w    iconID(a6),-(sp)
  151.         _GetResource
  152.         move.l    (sp)+,A0
  153.         
  154.         Move.l    A0, D0
  155.         
  156.         beq.s    ShowINITError        ; can't get it, give up
  157.  
  158.         _HLock                ; Lock the ICN# resource in A0
  159.         Move.l    A0, D0
  160.         
  161.         move.l    d0,-(sp)        ; leave handle on the stack for ReleaseResource
  162.         move.l    d0,a0
  163.         move.l    (a0),a0            ; dereference
  164.  
  165.         move.w    iconID(a6), -(sp)    ; the icon id, for icl4, icl8 -- BL
  166.         move.l    a0,-(sp)        ; icon pointer (iconPtrHdl)
  167.         move.w    moveX(a6),-(sp)        ; moveX    (MoveX)
  168.         
  169.         bsr    INITDraw1Bit        ; draw
  170.  
  171.         _ReleaseResource        ; releaese the resource
  172.  
  173. ShowINITExit:
  174.  
  175.         movem.l    (sp)+, d3-d7/a2-a4    ; restore registers
  176.         unlk    a6            ; ditch stack frame
  177.         move.l    (sp)+, a0        ; get return address
  178.         addq.l    #showINITArgs, sp    ; ditch incoming arguments
  179.         jmp    (a0)            ; return to caller
  180.  
  181. ShowINITError:
  182.         IF    Debug THEN
  183.         move.w    #1,-(sp)        ; just beep
  184.         _SysBeep
  185.         ENDIF
  186.         bra.s    ShowINITExit
  187.  
  188. ShowINITCredits:
  189.         dc.w    'ShowINIT by Paul Mercer'
  190.         dc.w    'modified 1/22/91 to show'
  191.         dc.w    'icl4 and icl8 types'
  192.         ENDPROC
  193.  
  194.  
  195. ;------------------------------------------------------------------------------------------------
  196. ;
  197. ;    Initializes the world and sets up the drawing rectangle
  198. ;
  199. ;------------------------------------------------------------------------------------------------
  200. INITInit:    PROC    EXPORT
  201.         WITH    myVars
  202.  
  203.         move.l    CurrentA5,saveA5(a6)    ; PM 10/6 save host A5
  204.         lea    localA5(a6),a5        ; PM7/21
  205.         move.l    a5,CurrentA5
  206.         pea    thePort(a6)        ; PM 10/6 use a5 reference instead of a6
  207.         _InitGraf            ; fixes color bug as per DA@ICOM
  208.         pea    myPort(a6)
  209.         _OpenPort
  210.  
  211.         move.w    myH,d0            ; get my h var
  212.         rol.w    #1,d0            ; compare against checksum
  213.         eor.w    #checksumConst,d0
  214.         cmp.w    myCheck,d0
  215.         beq.s    ScratchOK        ; checks, so go on
  216.         move    #firstX,myH        ; else initialize as first time
  217. ScratchOK:
  218.         lea    myPort(a6),a0        ; compute the destination rectangle
  219.         move.w    portBounds+bottom(a0),d0
  220.         sub.w    #bottomEdge,d0
  221.         swap    d0
  222.         move.w    myH,d0
  223.  
  224.         move.l    d0,destRect(a6)
  225.         move.l    d0,destRect+botRight(a6)
  226.         add.w    #iconWidth,destRect+right(a6)
  227.         add.w    #iconWidth,destRect+bottom(a6)
  228.  
  229.         rts
  230.  
  231.         ENDWITH
  232.         ENDPROC
  233.  
  234.  
  235. ;------------------------------------------------------------------------------------------------
  236. ;
  237. ;    Cleans up the work done by INITInit and advances the icon drawing position
  238. ;
  239. ;------------------------------------------------------------------------------------------------
  240. INITCleanup:    PROC    EXPORT
  241.         WITH    myVars
  242.  
  243.         move.w    myH,d0                ; get current position
  244.         move.w    moveX(a6),d1        ; get delta x
  245.         bpl.s    NotDefault            ; not default (-1)
  246.         move.w    #defaultMoveX,d1    ; default
  247. NotDefault:
  248.         add.w    d1,d0            ; increment icon position
  249.         move.w    d0,myH            ;  and save in ‘global’
  250.         rol.w    #1,d0            ; recompute checksum
  251.         eor.w    #checksumConst,d0
  252.         move.w    d0,myCheck        ;  and save it
  253. Exit:
  254.         pea    myPort(a6)
  255.         _ClosePort
  256.         ; *** (DBA) I think that QuickDraw leaves handles around.
  257.         ; *** (DBA) Too bad we can't get rid of them...
  258.         move.l    saveA5(a6),a5        ; PM 10/6 restore host A5
  259.         move.l    a5,CurrentA5
  260.         rts
  261.  
  262.         ENDWITH
  263.         ENDPROC
  264.  
  265.  
  266. ;------------------------------------------------------------------------------------------------
  267. ;                                
  268. ;    display the ICN# pointed to by iconPtr and move the pen horizontally by moveX
  269. ;     pass a -1 in moveX to move the standard amount, moveX should be 40 for most ICN#'s
  270. ;
  271. ;    PROCEDURE INITDraw1Bit(iconPtr: ICONListPtr; moveX: Integer); EXTERNAL
  272. ;
  273. ;    pascal void INITDraw1Bit(iconPtr, moveX)
  274. ;        ICONList *iconPtr;
  275. ;        short moveX;
  276. ;        extern;
  277. ;
  278. ;------------------------------------------------------------------------------------------------
  279. INITDraw1Bit:    PROC    EXPORT
  280.         IMPORT    INITInit, INITCleanup:CODE
  281.         IMPORT     DrawIcls    ;    plots icl4 or icl8..
  282.         
  283.         WITH    myVars
  284.  
  285.         link    a6,#varsSize        ; create stack frame
  286.         movem.l    d3-d7/a2-a4,-(sp)    ; save standard registers
  287.         bsr    INITInit                ; initialize for drawing
  288.         
  289.         clr.l    icl4Hand(a6)        ; 
  290.         clr.l    icl8Hand(a6)
  291.         
  292.         btst.b    #hasCQDBit,ROM85    ; try to get a color icon if CQD exists
  293.         bne.s    DrawMask            ; I could use SysEnvirons but I don't want to
  294.         
  295. ;    ////  Try and load an icl4 and icl8
  296. ; Get the resources here so there won't be a delay after drawing the mask...  
  297. ; Get both- their small, and just use what we need and toss anything not nil back later...
  298.  
  299.         clr.l    -(sp)            ; try to get an icl4 resource
  300.         move.l    #'icl4',-(sp)
  301.         move.w    theIconID(a6),-(sp)
  302.         _GetResource
  303.         move.l    (sp)+, icl4Hand(A6);
  304.         
  305.         clr.l    -(sp)            ; try to get icl8 resource
  306.         move.l    #'icl8', -(sp)
  307.         move.w    theIconID(a6),-(sp)
  308.         _GetResource
  309.         move.l    (sp)+,icl8Hand(A6);
  310.                 
  311. DrawMask:
  312.  
  313.         lea    myPort(a6),a2        ; get the desk port
  314.  
  315.         move.l    iconPtrHdl(a6),a3    ; get ICN# pointer
  316.         lea        myBitMap(a6),a4        ; point to bitmap structure
  317.         move.l    a3,baseAddr(a4)        ; fill it out
  318.         add.l    #maskOffset,baseAddr(a4) ; skip to mask
  319.         move    #iconRowBytes,rowBytes(a4)
  320.         move.l    #0,bounds(a4)        ; 0,0 topleft
  321.         move.w    #iconWidth,bounds+bottom(a4) ; 32,32 botright
  322.         move.w    #iconWidth,bounds+right(a4)
  323.  
  324.  
  325.         btst.b    #hasCQDBit,ROM85    ; try to get a color icon if CQD exists
  326.         bne    DrawBW        ;
  327.  
  328.         
  329.         
  330.     ; Get depth of main screen...
  331.         move.l    MainDevice,a3        ; get handle to main device
  332.         move.l    (a3),a3                ; dereference
  333.         move.l    gdPMap(a3),a3        ; get its pixmap handle
  334.         move.l    (a3),a3                ; dereference it
  335.  
  336.         cmp.w    #minColorDepth, pmPixelSize(a3);    Pixel depth less than 4?
  337.         blt        DrawBW
  338.         
  339.         clr.l    -(sp)
  340.         _NewRgn
  341.         move.l    a4,-(sp)
  342.         move.l    4(sp),a4
  343.         _BitMapToRegion
  344.         addq.l    #2,sp
  345.         move.l    a4,-(sp)
  346.         move.w    destRect+left(a6),-(sp)
  347.         move.w    destRect+top(a6),-(sp)
  348.         _OffsetRgn
  349.  
  350.         cmp.w    #8, pmPixelSize(a3);    Use routine for 8 bit and higher screens
  351.         bge.s    Handle8Bit
  352.         
  353.         ; This is Handle4Bit    (must be 4 bit)
  354.         
  355.         cmp.l     #0, icl4Hand(a6)
  356.         beq.s    try8
  357.         ; draw a icl4 in 4 bit mode, this is the best combination
  358.         
  359. ;        ------- 
  360.         move.l    icl4Hand(a6), -(sp)     ; the icl handle
  361.         pea        destRect(a6)
  362.         pea        portBits(a2)    ; for copybits...
  363.         move.w    #4, -(sp)    ; depth of main screen
  364.         bsr        DrawIcls;
  365. ;        -------
  366.         
  367.         bra        DoneDrawing
  368.         
  369. try8:    cmp.l    #0, icl8Hand(a6)
  370.         beq.s    DrawBW
  371.         ; draw a icl8 in 4 bit mode
  372. ;        -------
  373.         move.l    icl8Hand(a6), -(sp)     ; the icl handle
  374.         pea        destRect(a6)
  375.         pea        portBits(a2)    ; for copybits...
  376.         move.w    #8, -(sp)    ; depth of main screen
  377.         bsr        DrawIcls;
  378. ;        -------
  379.         bra.s    DoneDrawing
  380.         
  381. Handle8Bit:                            ; Handle 8 bit (and higher) screens..
  382.         cmp.l     #0, icl8Hand(a6)
  383.         beq.s    try4
  384.         ; draw a icl8 in 8 bit mode
  385. ;        -------
  386.         move.l    icl8Hand(a6), -(sp)     ; the icl handle
  387.         pea        destRect(a6)
  388.         pea        portBits(a2)    ; for copybits...
  389.         move.w    #8, -(sp)        ; depth of icl 
  390.         bsr        DrawIcls;
  391. ;        -------
  392.         bra.s    DoneDrawing
  393.         
  394. try4:    cmp.l    #0, icl4Hand(a6) ;        Couldnt find an icl8, is there an icl4?
  395.         beq.s    DrawBW
  396.         ; draw a icl4 in 8 bit mode
  397. ;        -------
  398.         move.l    icl4Hand(a6), -(sp)     ; the icl handle
  399.         pea        destRect(a6)
  400.         pea        portBits(a2)    ; for copybits...
  401.         move.w    #4, -(sp)    ; depth of main screen
  402.         bsr        DrawIcls;
  403. ;        -------
  404.         bra.s    DoneDrawing
  405.  
  406. DrawBW:    ; Draw the ICN# black and white pattern... 
  407.  
  408.         move.l    a4,-(sp)        ; punch hole with mask
  409.         pea    portBits(a2)        ;  for its portbits
  410.         pea    srcRect
  411.         pea    destRect(a6)
  412.         move    #srcBic,-(sp)        ; punch a hole
  413.         clr.l    -(sp)            ; no clip region
  414.         _CopyBits
  415.  
  416.         sub.l    #128,baseAddr(a4)
  417.         move.l    a4,-(sp)        ; now draw (or) icon
  418.         pea    portBits(a2)
  419.         pea    srcRect
  420.         pea    destRect(a6)
  421.         move    #srcOr,-(sp)
  422.         clr.l    -(sp)
  423.         _CopyBits
  424.  
  425. DoneDrawing:    ; Dispose of any icl4/icl8 handles... 
  426.         cmp.l    #0, icl4Hand(a6)
  427.         beq.s    release2
  428.         move.l    icl4Hand(a6), -(sp)
  429.         _ReleaseResource
  430. release2:
  431.         cmp.l    #0, icl8Hand(a6)
  432.         beq.s    OuttaHere
  433.         move.l    icl8Hand(a6), -(sp)
  434.         _ReleaseResource
  435.  
  436. OuttaHere:
  437.         bsr    INITCleanup                ; cleanup, advance icon location
  438.         movem.l    (sp)+,d3-d7/a2-a4    ; restore registers
  439.         unlk    a6                    ; ditch stack frame
  440.         move.l    (sp)+,a0            ; get return address
  441.         
  442.         add.l    #initDrawArgs, sp    ; ditch incoming args
  443.         
  444.         jmp    (a0)                    ; back to caller
  445.  
  446. srcRect:    dc.w    0,0,32,32        ; for copybits
  447.  
  448.         ENDWITH
  449.         ENDPROC
  450.  
  451.  
  452.  
  453.  
  454. ;------------------------------------------------------------------------------------------------
  455. ;
  456. ;    Draws an icl4 or icl8, depending on the size.  Assumes a valid handle is passed.
  457. ;    void DrawIcls(Handle iclHand, Rect *destRect, PixMap *DestPM, word pixSize);
  458. ;
  459. ;    Local varibles:
  460. ;        Handle : GDHand;
  461. ;        PixMap:    pixMap;
  462. ;
  463. ;------------------------------------------------------------------------------------------------
  464.  
  465. DrawIcls:    PROC    EXPORT
  466.         WITH    iclVars
  467.         
  468.         
  469.         link    a6,#iclVarSize        ; create stack frame
  470.         movem.l    d7/a1-a4,-(sp)        ; save standard registers
  471.         
  472.     ;    _Debugger ;
  473.         
  474.         move.w    pixSize(a6), d7        ; pixSize into d7
  475.         move.l    DestPM(a6),  a2        ; take out?
  476.         lea        pixMap(a6), a3        ; local PixMap to a3
  477.  
  478.         lea        destRect(a6), a1
  479.         move.l    destRect(a6), a1
  480.         
  481.         subq.l    #4, sp
  482.         Move.w    d7,    -(sp)
  483.         _GetCTable                    ; Get system clut..
  484.         Move.l    (a7)+, pmTable(a3)
  485.  
  486.         beq.s        done                ; Couldn't get it...  unusual
  487.         
  488.         subq.l    #4, sp                ; Get their graphic device handle
  489.         _GetGDevice
  490.         Move.l    (sp)+, GDHand(a6)
  491.         
  492.         move.l    iclHand(a6), A0        ; lock the icl4/8 handle
  493.         _Hlock
  494.         Move.l    (a0),pmBaseAddr(a3)    ; derefrence icl handle
  495.         
  496.         ext.l    d7        ; multiply size * 4
  497.         move.l    d7, d0
  498.         asl.l    #2, d0    ; mult by 4 for rowbytes
  499.         ori.w    #$8000, d0        ; denotes a pixmap 
  500.         move.w    d0, pmRowBytes(a3); insert into structure
  501.         
  502.         clr.w    pmVersion(a3)
  503.         clr.w    pmPackType(a3)
  504.         clr.l    pmPackSize(a3)
  505.         
  506.         movea.l    GDHand(a6), a0        ; Get HRes and VRes
  507.         movea.l    (a0), a0    ; derefrence GDHandle
  508.         movea.l    gdPMap(a0), a0
  509.         movea.l    (a0), a0
  510.         move.l    pmHRes(a0), pmHRes(a3)
  511.         move.l    pmVRes(a0), pmVRes(a3)
  512.         
  513.         clr.w    pmPixelType(a3)
  514.         move.w    d7, pmPixelSize(a3)
  515.         move.w     #1, pmCmpCount(a3)
  516.         move.w    d7, pmCmpSize(a3)
  517.         clr.l    pmPlaneBytes(a3)
  518.         clr.l    pmReserved(a3)
  519.         clr.l    pmBounds(a3)    ; top left = 0
  520.         move.l    #$00200020, pmBounds+4(a3)    ; Dest rect- 0,0,32,32        
  521.  
  522.         ; Do copybits...
  523.         
  524.         move.l        a3, -(sp)                    ; the source pixmap
  525.         move.l        a2 , -(sp) ; DestPM(a6)            ; the dest pixmap
  526.         lea            pmBounds(a3) , a0;
  527.         move.l        a0, -(sp);            ; source rect
  528.         move.l            destRect(a6) , -(sp)
  529.         move.w        #srcCopy,-(sp);
  530.         move.l        a4,-(sp)        ; mask
  531.         _CopyBits
  532. done:        
  533.         move.l    iclHand(a6),a0
  534.         _HUnlock
  535.         move.l    pmTable(a3), -(sp)
  536.         _DisposCTable        
  537.  
  538.         move.l    a4,-(sp)
  539.         _DisposeRgn
  540.         
  541.         movem    (sp)+, d7/a1-a4
  542.         unlk    a6                    ; ditch stack frame
  543.         move.l    (sp)+, a0            ; get return address
  544.         add.l    #iclDrawArgs, sp    ; ditch incoming arguments
  545.         jmp    (a0)                    ; return to caller
  546.  
  547.         ENDWITH
  548.  
  549.         ENDPROC
  550.  
  551.         END
  552.